<?php

namespace App\Models;

use DateTimeInterface;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;


class StatisticLog extends Model
{
    use SoftDeletes;

    protected $table = 'statistic_logs';

    protected $fillable = ['id', 'type', 'res_id', 'user_id', 'user_ip', 'click_date', 'click_num'];

    protected function serializeDate(DateTimeInterface $date)
    {
        return $date->format($this->dateFormat ?: 'Y-m-d H:i:s');
    }

    // 非遗
    const TYPE_CULTURAL_HERITAGES = 1;  
    // 文化信息
    const TYPE_CULTURE_INFO = 2;
    // 新闻资讯
    const TYPE_NEWS_INFO = 3;
    // 文化之声
    const TYPE_CULTURE_VOICE = 4;
    // 点播艺课
    const TYPE_VIDEO = 5;
}
